<?php
/**
 * @file cut.php
 * @package taoke_html
 * @subpackage 
 * @version $id: 0.1 UTF-8 2009-3-16 下午01:44:57 $
 * @author LD King (mifunny.info)
 * @copyright Copyright (c) 2007 - 2009 MiFunny China Inc. (http://mifunny.info)
 */
$submit = $_POST['submit'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>切割淘宝网页HTML代码 | 水草树</title> 
<meta name="robots" content="nofollow" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
	<div id="header">
		<p><a href="cut.php">数据切割</a> | <a href="submit.php">提交淘客数据库</a> | <a href="obtain.php">随机取出淘客代码</a></p>
	</div>
<?php
if (isset($submit) and !empty($submit)) {
	$html = $_POST['table'];
	$pattern = "/<h2 class=\"Title\">宝贝详情<\/h2>/s";
	
	$html = preg_replace('/<a.*?href.+?>(.*?)<\/a>/si', "$1", $html);
	
	
	?>
<div class="box"></div>
<?php } else { ?>
<form action="cut.php" method="post">
	<br />&nbsp;<br /><b>HTML源码</b>:
	<br /><textarea name="table" cols="70" rows="10"></textarea>
	<div style="margin-left:100px;">
		<input name="submit" type="submit" value="提交切割" />
		<input name="submit" type="reset" value="重置" />
	</div>
</form>
<?php }	?>
	
</div><!-- #wrapper -->
</body>
</html>